﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Miao.UI;
using UnityEngine.EventSystems;
using UnityEngine.UI;
/// <summary>
/// 用于排列型的UI拖拽设置
/// </summary>
public class DragLayout : RestrictedCenterDrag
{
    public DragLayoutGroupBase dragLayoutGroup;
    

    public override void OnBeginDrag(PointerEventData eventData)
    {
        base.OnBeginDrag(eventData);
        rectTransform.parent = dragLayoutGroup.casheDragParent;
    }

    public override void OnEndDrag(PointerEventData eventData)
    {
        rectTransform.parent = dragLayoutGroup.childGroupRectTransform;
        dragLayoutGroup.SetDragSiblingIndex(this.rectTransform);
    }


}

